<template>
    <div>
        <a-modal
            title="报销单汇总打印"
            :visible="visible"
            @ok="visible = false"
            @cancel="closeVisible"
            :footer="null"
            class="reimbursement-totalPrint-modal"
            :width="794+48+16"
        >
            <div style="width: 794px;">
                <div>
                    <a-button class="blue-btn" type="primary" v-print="printObj">打印</a-button>
                </div>
                <div id="reimbursement-totalPrint">
                    <div class="reimbursement-summary-1">
                        <div class="jcybx-printTable">
                            <div class="jcybx-printTable-leftTable">
                                <div>
                                    <h3 class="jcybx-printTable-leftTable-title">
                                        费用报销单
                                    </h3>
                                    <div style="margin: 0 auto;width: calc(100% - 16px);display: flex;flex-direction: row;justify-content: space-between;font-size: 12px;font-family: '宋体' !important;color: black;">
                                        <span>单据号：{{ fromState.fdjh }}</span>
                                        <span>单位：元</span>
                                    </div>
                                </div>
                                <div>
                                    <table class="reimbursement-transportation-table reimbursement-transportation-table-min" border="1" cellspacing="0" style="width: calc(100%);border-color: #000 !important;table-layout: fixed;">
                                        <tr >
                                            <th>审评内容</th>
                                            <td colspan="2">{{ fromState.fbxnrms }}</td>
                                            <th colspan="3">{{ fromState.fbxsjms }}</th>
                                        </tr>
                                        <tr >
                                            <th :rowspan="2">姓名</th>
                                            <th>劳务费</th>
                                            <th >差旅费</th>
                                            <th :rowspan="2">报销帐号开户行/城市</th>
                                            <th :rowspan="2" >报销帐号</th>
                                            <!-- <th :rowspan="2">报销金额(劳务费/差旅费)</th> -->
                                            <th :rowspan="2">签字/日期</th>
                                        </tr>
                                        <tr >
                                            <!-- <th >审评天数</th> -->
                                            <th >金额</th>
                                            <th >金额</th>
                                        </tr>
                                        <tr v-for="(item,index) in transportationList" :key="index" >
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                <span style="display: block;">{{ item.realname }}</span>（{{item.fjcsf}}）
                                            </td>
                                            <!-- <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.flwfts }}
                                            </td> -->
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{item.flwfsbje}}
                                            </td>
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.fclfsbhjje }}
                                            </td>
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.fkfh }}/{{ item.fkhhszd }}
                                            </td>
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.fyhkh }}
                                            </td>
                                            <!-- <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.flwfsbje }} / {{ item.fclfsbhjje }}
                                            </td> -->
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                <img v-if="getQmImg(item.fuserid)" :src="getQmImg(item.fuserid)" alt="签名图片" class="qmImgge">
                                                <span v-else>{{ item.realname }}</span>
                                                <span style="font-size: 11px;display: block;">{{ fromState.fjcjsrq }}</span>
                                            </td>
                                            <!--  -->
                                            <!-- <td v-if="((index+1) % 2 == 0) && item.list.length == 0">
                                                {{ item.fclfsbhjje }}
                                            </td> -->
                                        </tr>
                                        <template v-for="(fitem,findex) in fjList" >
                                            <tr>
                                                <td :key="findex">
                                                    <span>{{ fitem.mc }}</span>
                                                </td>
                                                <td></td>
                                                <td>{{ fitem.je }}</td>
                                                <td>{{ fitem.khyh }}</td>
                                                <td>{{ fitem.bxzh }}</td>
                                                <td></td>
                                            </tr>
                                        </template>
                                        <tr>
                                            <th>小计</th>
                                            <!-- <td></td> -->
                                            <td>{{ fromState.flwfbxje }}</td>
                                            <td>{{ fromState.fclfbxje }}</td>
                                            <td></td>
                                            <td></td>
                                            <!-- <td>{{ fromState.fhjbxje }}</td> -->
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <th>总计金额</th>
                                            <td colspan="2">大写： {{fromState.fhjbxjedx}}</td>
                                            <th>核销</th>
                                            <td colspan="2">{{ fromState.fhjbxje }}</td>
                                        </tr>
                                    </table>
                                </div>
                                <div style="display: flex;justify-content: space-between;font-size: 14px;color: rgb(0, 0, 0);margin: 10px;padding-right: 20%;font-family: '宋体' !important;">
                                    <span>经办人：</span>
                                    <span>科室：</span>
                                    <span>审核：</span>
                                    <span>审批：</span>
                                </div>
                            </div>
                            <div class="jcybx-printTable-rightPz">
                                <span style="letter-spacing: 5px;">附原始凭证</span>
                                <span>{{ fromState.fbxdj }}</span>
                                <span>张</span>
                            </div>
                        </div>
                        <div class="reimbursement-transportation-table-bz">
                            <div style="padding: 0px 20px;">注：</div>
                            <div style="padding-bottom: 3px;">
                                <p>
                                    1、劳务费：以实际审评时间计算，审评组长350元/人/天，审评员300元/人/天。区局各处室、审评分局、区审评中心无劳务费。
                                </p>
                                <p>
                                    2、城市间交通费:审评员从常驻地到被审评企业所在地乘坐火车、大巴、飞机等交通工具的费用（含交通意外保险费），凭据报销。火车票只能报二等座。
                                </p>
                                <p>
                                    3、住宿费：参照自治区财政厅《关于调整自治区本级党政机关差旅住宿费标准等有关事项的通知》（桂财行〔2015〕123号）执行，在标准限额之内凭发票据实报销。
                                </p>
                                <p>
                                    4、伙食补助费：审评员按参加审评自然(日历)天数计算，离开驻地的观察员按实际审评时间计算，100元/人/天包干，不需票据。
                                </p>
                                <p>
                                    5、市内交通费：审评员按参加审评自然(日历)天数计算，离开驻地的观察员按实际审评时间计算，80元/人/天包干，不需票据；
                                </p>
                                <p>
                                    审评员往返机场、火车站等发生的大巴、地铁、公共汽车等（不含出租车）交通费用凭据报销（往返各1次）。
                                </p>
                                <p>
                                    6、实际发生住宿而无住宿费发票的，不得报销住宿费以及城市间交通费、伙食补助费和市内交通费；有住宿发票但无城市间交通票据的，需注明是否有单位派车。单位派车出差的不报销城市间交通费和市内交通费，并在“金额”栏注明“单位车”；无单位派车的，可报销市内交通费，并在“金额”栏注明“无单位派车”。审评当天往返的，按标准报销城市间交通费、伙食补助费和市内交通费。
                                </p>
                                <p>
                                    7、此表请审评组结束审评前填写或打印，由审评组及观察员全体成员签字确认；票据产生时间应与审评期间对应，开票名称"xx壮族自治区食品药品审评查验中心"（组织机构代码：12450000782144833W），并有2人以上共同签字。
                                </p>
                                <p style="color: black;">
                                    8、根据资金安全管理要求报销费用如无特殊情况按劳务费和差旅费分两笔转给审评员个人，每一位审评员只能提供一个长期的开户行及账户，如无特殊情况不得随意更换，更换需提交纸质说明原因。开户行需为国有四大银行(即农行、中行、建行、工行)，账户类型需为一类卡账户，审评员需仔细填报个人银行账户信息核对无误，如有错漏后果自负。
                                </p>
                            </div>
                        </div>
                    </div>
                    <div style="page-break-after:always"></div>
                    <div class="reimbursement-summary-1">
                        <div class="jcybx-printTable">
                            <div class="jcybx-printTable-leftTable">
                                <div>
                                    <h3 class="jcybx-printTable-leftTable-title">
                                        xx壮族自治区食品药品审评查验中心<br/>审评查验明细报销单
                                    </h3>
                                </div>
                                <div>
                                    <table class="reimbursement-transportation-table reimbursement-transportation-table-min" border="1" cellspacing="0" style="width: calc(100%);border-color: #000 !important;table-layout: fixed;">
                                        <tr >
                                            <th>审评内容</th>
                                            <td colspan="10">{{ fromState.fbxnrms }}</td>
                                            <th colspan="4">{{ fromState.fbxsjms }}</th>
                                        </tr>
                                        <tr >
                                            <th rowspan="3">姓名</th>
                                            <th colspan="2">劳务费</th>
                                            <th colspan="10">差旅费</th>
                                            <th colspan="2">报销金额</th>
                                        </tr>
                                        <tr >
                                            <th rowspan="2">审评<br/>天数</th>
                                            <th rowspan="2">金额</th>
                                            <th colspan="4">城市间交通费</th>
                                            <th colspan="2">住宿费</th>
                                            <th colspan="2">伙食补助费</th>
                                            <th colspan="2">市内交通费</th>
                                            <th rowspan="2">劳务费</th>
                                            <th rowspan="2">差旅费</th>
                                        </tr>

                                        <tr >
                                            <th>日期</th>
                                            <th>起始</th>
                                            <th>交通<br/>方式</th>
                                            <th>金额</th>
                                            <th>天数</th>
                                            <th>金额</th>
                                            <th>天数</th>
                                            <th>金额</th>
                                            <th>天数</th>
                                            <th>金额</th>
                                        </tr>
                                        <tr v-for="(item,index) in transportationList" :key="index" >
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                <span style="display: block;">{{ item.realname }}</span>（{{item.fjcsf}}）
                                            </td>
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.flwfts }}
                                            </td>
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.flwfsbje }}
                                            </td>
                                            <td style="font-size: 12px;zoom: 0.9;">
                                                <span v-if="item.fcsjjtwqsrq && item.fcsjjtwddrq">
                                                    {{item.fcsjjtwqsrq.substr(5,2)}}.{{item.fcsjjtwqsrq.substr(8,2)}}-
                                                    {{item.fcsjjtwddrq.substr(5,2)}}.{{item.fcsjjtwddrq.substr(8,2)}}
                                                </span>
                                                <span v-else></span>
                                            </td>
                                            <td style="font-size: 12px;zoom: 0.9;">
                                                {{item.fwjtfqscs}}-{{ item.fwjtfddcs }}
                                            </td>
                                            <td >
                                                {{ item.fcsjjtfs }}
                                            </td>
                                            <td >
                                                {{ item.fwjtfybje }}
                                            </td>
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.fzxfts }}
                                            </td>
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.fzxfsbje }}
                                            </td>
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.fhsbzts }}
                                            </td>
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.fhsbzsbje }}
                                            </td>
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.fsnjtbzts }}
                                            </td>
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.fsnjtbzje }}
                                            </td>
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.flwfsbje }}
                                            </td>
                                            <td :rowspan="item.list.length" v-if="item.list.length !== 0">
                                                {{ item.fclfsbhjje }}
                                            </td>
                                        </tr>
                                        <colgroup>
                                            <col>
                                            <col style="width: 30px !important;">
                                            <col>
                                            <col style="width: 75px !important;">
                                            <col style="width: 70px !important;">
                                            <col>
                                            <col>
                                            <col style="width: 30px !important;">
                                            <col>
                                            <col style="width: 30px !important;">
                                            <col>
                                            <col style="width: 30px !important;">
                                            <col>
                                            <col>
                                            <col>
                                        </colgroup>
                                        <tr>
                                            <th>小计</th>
                                            <td></td>
                                            <td>{{  fromState.flwfbxje }}</td>
                                            <td></td>
                                            <td></td>
                                            <td></td>
                                            <td>{{ fromState.fjtfxj }}</td>
                                            <td></td>
                                            <td>{{ fromState.fzsfxj }}</td>
                                            <td></td>
                                            <td>{{ fromState.fhsbzxj }}</td>
                                            <td></td>
                                            <td>{{ fromState.fsnjtfxj }}</td>
                                            <td>{{ fromState.flwfbxje }}</td>
                                            <td>{{ fromState.fclfbxje }}</td>
                                        </tr>
                                    </table>
                                </div>
                                <div style="min-height: 21px;display: flex;justify-content: space-between;font-size: 14px;color: rgb(0, 0, 0);margin: 10px;padding-right: 20%;">
                                </div>
                            </div>
                            <div class="jcybx-printTable-rightPz">
                            </div>
                        </div>
                    </div>
                    <div style="page-break-after:always"></div>
                    <div class="reimbursement-summary-1">
                        <div v-for="(item,index) in allSpecialList" :key="index" style="margin-bottom: 15px;">
                            <div class="table-hear">
                                <h3>xx壮族自治区食品药品审评查验中心报账特殊情况申请表</h3>
                            </div>
                            <table class="reimbursement-transportation-table" border="1" cellspacing="0" style="width: calc(100%);border-color: #000 !important;">
                                <tr >
                                    <th colspan="4">审评内容</th>
                                </tr>
                                <tr>
                                    <td class="special-table-lable-td">经办科室</td>
                                    <td>{{ fromState.fjbks }}</td>
                                    <td class="special-table-lable-td">经办人</td>
                                    <td>{{ fromState.fjbr }}</td>
                                </tr>
                                <tr>
                                    <td class="special-table-lable-td">项目内容</td>
                                    <td>{{ fromState.fbxnrms }}</td>
                                    <td class="special-table-lable-td">项目时间</td>
                                    <td>{{ fromState.fbxsjms }}</td>
                                </tr>
                                <tr>
                                    <td class="special-table-lable-td">申请日期</td>
                                    <td>{{item.fsqrq}}</td>
                                    <td class="special-table-lable-td">特殊情况申请天数</td>
                                    <td>{{ item.fsqts }}</td>
                                </tr>
                                <tr>
                                    <td class="special-table-lable-td">
                                        <div style="display: flex;justify-content: center;">
                                            <span style="width: 48px;display: flex;justify-content: space-between;">
                                                <span>金</span>
                                                <span>额</span>
                                            </span>
                                        </div>

                                    </td>
                                    <td style="text-align: left;">{{item.fsqje}}</td>
                                </tr>
                                <tr  v-if="item.fsqlx == '超期产生' || item.fsqlx == '超期产生和午休房'">
                                    <th colspan="4">超期产生额外费用报销填报</th>
                                </tr>
                                <tr v-if="item.fsqlx == '超期产生' || item.fsqlx == '超期产生和午休房'">
                                    <td class="special-table-lable-td">特殊情况说明</td>
                                    <td colspan="3">{{ item.fewfybxsm }}</td>

                                </tr>
                                <tr v-if="item.fsqlx == '超期产生' || item.fsqlx == '超期产生和午休房'">
                                    <td class="special-table-lable-td">申请人签字确认</td>
                                    <td>
                                        <img v-if="getQmImg(item.fewfybxsqrid)" :src="getQmImg(item.fewfybxsqrid)" alt="签名图片" class="qmImgge">
                                        <span v-else>{{ item.fewfybxsqrxm }}</span>
                                        <!-- {{item.fewfybxsqrxm}} -->
                                    </td>
                                    <td class="special-table-lable-td">中心领导签字确认</td>
                                    <td>
                                        <!-- {{ item.fzxldid }} -->
                                        {{item.fzxldyjr}}
                                    </td>
                                </tr>
                                <tr  v-if="item.fsqlx == '午休房'">
                                    <th colspan="4">午休房报销填报</th>
                                </tr>
                                <tr v-if="item.fsqlx == '午休房'">
                                    <td class="special-table-lable-td">项目地址</td>
                                    <td>{{ item.fwxfbxxmdz }}</td>
                                    <td class="special-table-lable-td">工作地址</td>
                                    <td>{{item.fwxfbxgzdz}}</td>
                                </tr>
                                <tr v-if="item.fsqlx == '午休房'">
                                    <td class="special-table-lable-td">申请人签字确认</td>
                                    <td>
                                        <img v-if="getQmImg(item.fwxfsqrid)" :src="getQmImg(item.fwxfsqrid)" alt="签名图片" class="qmImgge">
                                        <span v-else>{{ item.fwxfsqrxm }}</span>
                                        <!-- {{item.fwxfsqrxm}} -->
                                    </td>
                                    <td class="special-table-lable-td">中心领导签字确认</td>
                                    <td>
                                        <!-- {{ item.fzxldid }} -->
                                        {{item.fzxldyjr}}
                                    </td>
                                </tr>

                                <tr  v-if="item.fsqlx == '无单位派车'">
                                    <th colspan="4">无单位派车填报</th>
                                </tr>
                                <tr v-if="item.fsqlx == '无单位派车'">
                                    <td class="special-table-lable-td">无单位派车填报说明</td>
                                    <td colspan="3">{{ item.fewfybxsm }}</td>
                                </tr>
                                <tr v-if="item.fsqlx == '无单位派车'">
                                    <td class="special-table-lable-td">申请人签字确认</td>
                                    <td>
                                        <img v-if="getQmImg(item.fewfybxsqrid)" :src="getQmImg(item.fewfybxsqrid)" alt="签名图片" class="qmImgge">
                                        <span v-else>{{ item.fewfybxsqrxm }}</span>
                                        <!-- {{item.fewfybxsqrxm}} -->
                                    </td>
                                    <td class="special-table-lable-td">中心领导签字确认</td>
                                    <td>
                                        <!-- {{ item.fzxldid }} -->
                                        {{item.fzxldyjr}}
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4" style="text-align: left;">
                                        填报须知：<br/>
                                        一、项目内容为审评事项或培训等事项。<br/>
                                        二、项目时间为所属事项开始到截止时间，需具体到时点。<br/>
                                        三、特殊情况申请天数为额外产生费用的天数。如午休房按实际产生费用天数填报。<br/>
                                        四、金额栏填除差旅补助外所额外产生的住宿费、交通费等明细合计金额，合计超过2000元（含）以上的须经中心主要负责人审批。<br/>
                                        五、<span style="font-weight: bold;">1.特殊情况填报说明：</span>需说明额外产生费用原因、费用明细及费用是否自行承担，若由中心承担需在金额栏填报，自行承担费用可不填写金额栏。<br/>
                                &emsp;&emsp;<span style="font-weight: bold;">2.事项一审批流程：</span>需由申请人事前提出申请并附有效签名，直接经中心主要负责人审批。<br/>
                                        六、<span style="font-weight: bold;">1.午休房报销填报说明：</span>仅限跨区申请，如：工作单位在青秀区到江南区审评，仅可在江南区申请午休房。<br/>
                                &emsp;&emsp;<span style="font-weight: bold;">2.事项二审批流程：</span>需由申请人事前提出申请并附有效签名，经科室负责人同意后，超额费用不超过2000元的由该科室分管领导审批同意后才方报销；超额费用超过2000元的需经中心主要负责人审批同意后，方可报销。<br/>
                                        七、本表可按同一事项合并填报。
                                    </td>
                                </tr>
                            </table>
                            <div style="page-break-after:always"></div>
                        </div>
                    </div>
                    <div class="reimbursement-summary-1" v-if="expertServicesList && expertServicesList.length">
                        <div class="table-hear">
                            <h3>{{ fromState.fjcqymc }}专家劳务费</h3>
                        </div>
                        <table class="reimbursement-transportation-table" border="1" cellspacing="0" style="width: calc(100%);border-color: #000 !important;">
                            <tr >
                                <th>序号</th>
                                <th>姓名</th>
                                <th>身份证号</th>
                                <th>单位</th>
                                <th>职称</th>
                                <th>劳务费税前金额</th>
                                <th>个税</th>
                                <th>劳务费实发金额</th>
                                <th>银行卡号</th>
                            </tr>
                            <tr v-for="(item,index) in expertServicesList" :key="index" >
                                <td>{{ index+1 }}</td>
                                <td>{{ item.realname }}</td>
                                <td style="width: 100px;white-space: normal;word-wrap: break-word;word-break: break-all;">{{ item.fsfzh }}</td>
                                <td>{{ item.fgzdw }}</td>
                                <td>{{ item.fzc }}</td>
                                <td>{{ item.flwfsqje }}</td>
                                <td>{{ item.flwfgsje }}</td>
                                <td>{{ item.flwfsbje }}</td>
                                <td style="width: 100px;white-space: normal;word-wrap: break-word;word-break: break-all;">{{ item.fyhkh }}</td>
                            </tr>
                            <tr >
                                <th>合计</th>
                                <td colspan="8">{{ expertServicesTotal }}</td>
                            </tr>
                            <tr >
                                <td colspan="9" style="text-align: left;">
                                    备注：当劳务费小于800元，不缴个税，劳务费税前金额=实发金额；当劳务费大于800且没超过4000元，劳务费税前金额=（劳务费实发金额-160）/0.8，个税=(劳务费税前金额- 800元)*20%。
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="reimbursement-summary-1" v-if="fromState.fsfywdwpc == '是'">
                        <div style="page-break-after:always"></div>
                        <div class="table-hear">
                            <h3>费用报销说明</h3>
                        </div>
                        <table class="reimbursement-transportation-table" border="1" cellspacing="0" style="width: calc(100%);border-color: #000 !important;">
                            <!-- <tr>
                                <th colspan="4">

                                </th>
                            </tr> -->
                            <tr>
                                <th >审评内容及审评时间</th>
                                <td>{{fromState.fbxnrms}}/{{fromState.fbxsjms}}</td>
                                <th style="width: 146px;">有无单位派车</th>
                                <td style="width: 146px;">无</td>
                            </tr>
                            <tr>
                                <th style="width: 146px;">无城市间交通费/无住宿说明</th>
                                <td colspan="3">
                                    {{ fromState.fwcsjtzssm }}
                                </td>
                            </tr>
                            <tr>
                                <th >审评人员签字确认</th>
                                <td colspan="3" style="text-align: left;">{{ fromState.fwcsjtzssmqzrxm }}</td>
                            </tr>
                            <tr>
                                <td colspan="4" style="text-align: left;">填写说明：1、审评内容及审评时间根据报销单填写。2、有无单位派车若无，填写“无”。3、审评组人员需附此表方可报销市区交通补助费，经办人负责督办</td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </a-modal>
    </div>
</template>
<script>
import {
    getMoreUserSignLinkList,
    getzzsqd,
} from './service/index'
export default {
    components:{

    },
    props:{

    },
    data(){
        return{
            visible:false,
            fromState:{},
            transportationList:[],
            allSpecialList:[],
            expertServicesList:[],
            expertServicesTotal:0,
            printObj:{
                id:"reimbursement-totalPrint", //需要打印的id名称
                popTitle:"报销单汇总打印",//文档的名称
                // preview:true,//预览功能，不好用
                zIndex:'20002',
                beforeOpenCallback(vue){
                    //console.log('打印回调',vue)
                },
                openCallback (vue) {//打开之前
                    //console.log('打开之前',vue)
                },
                closeCallback (vue) {//关闭了打印工具
                    //console.log('关闭了打印工具')
                },
            },
            qmImgList: [],
            fjList: []
        }
    },
    watch:{

    },
    mounted(){

    },
    methods:{
        getData(fromState,transportationList,allSpecialList,expertServicesList,expertServicesTotal){
            this.addPrintStyles()
            //console.log(fromState,transportationList)
            this.fromState = fromState
            this.transportationList = transportationList
            this.allSpecialList = allSpecialList
            this.expertServicesList = expertServicesList
            this.expertServicesTotal = expertServicesTotal
            this.getLinkList(this.transportationList)
            this.getzzsqdList()
        },
        printClick(){

        },
        getLinkList(List){
            this.qmImgList = []
            List.forEach(async item => {
                //console.log('没进来吗？？？',item)
                let resa = await getMoreUserSignLinkList({ids:item.fuserid})
                if(resa.success && resa.result.length){
                    if(resa.result[0].signLink == ''){
                        // //console.log('没有获得图片 signLink == 0')
                        this.qmImgList.push({
                            realname: item.realname,
                            fuserid: item.fuserid,
                            url: null
                        })
                    } else {
                        this.qmImgList.push({
                            realname: item.realname,
                            fuserid: item.fuserid,
                            url: resa.result[0].signLink+'&aa='+Date.now()
                        })
                        //console.log('获得的签名图片列表',this.qmImgList)
                    }
                }
            })
            if(this.allSpecialList.length){
                this.allSpecialList.forEach(async item => {
                    let resa = await getMoreUserSignLinkList({ids:item.fzxldid})
                    if(resa.success && resa.result.length){
                        if(resa.result[0].signLink == ''){
                            // //console.log('没有获得图片 signLink == 0')
                            this.qmImgList.push({
                                realname: item.fzxldyjr,
                                fuserid: item.fzxldid,
                                url: null
                            })
                        } else {
                            this.qmImgList.push({
                                realname: item.fzxldyjr,
                                fuserid: item.fzxldid,
                                url: resa.result[0].signLink+'&aa='+Date.now()
                            })
                            //console.log('获得的签名图片列表',this.qmImgList)
                        }
                    }
                })
            }
        },
        getzzsqdList(){
            getzzsqd({fbxdid: this.fromState.fbxdid}).then(res => {
                if(res.success){
                    this.fjList = []
                    this.fjList = res.result
                }
            })
        },
        // 签名图片
        getQmImg(ids){
            let url = null
            this.qmImgList.forEach(item => {
                if(ids == item.fuserid){
                    // //console.log('匹配成功',item)
                    url = item.url
                }
            })
            return url
        },
        closeVisible(){
            this.visible = false
            this.removePrintStyles()
        },
        addPrintStyles() {
            // 创建并添加包含@page规则的<style>元素
            this.printStyleElement = document.createElement('style');
            this.printStyleElement.type = 'text/css';
            this.printStyleElement.media = 'print';
            this.printStyleElement.innerHTML = `
                @page {
                    margin-top: 1.1in;
                    margin-right: 0.5in;
                    margin-bottom: 0.5in;
                    margin-left: 0.5in;
                /* 其他打印样式 */
                }
            `;
            document.head.appendChild(this.printStyleElement);
            //console.log('打印@page',this.printStyleElement)
        },
        removePrintStyles() {
            // 确保printStyleElement存在且已被添加到DOM中
            if (this.printStyleElement && this.printStyleElement.parentNode) {
                this.printStyleElement.parentNode.removeChild(this.printStyleElement);
                this.printStyleElement = null; // 清除引用
            }
        },
    }
}
</script>
<style lang="less">
.reimbursement-totalPrint-modal{
    //汇总表
    .reimbursement-summary-1{
        width: 100%;
        padding: 10px 15px;
        .table-hear{
            display: flex;
            font-weight: 600;
            flex-direction: column;
            h3{
                font-weight: 600;
                font-size: 18px;
                text-align: center;
                font-family: '方正小标宋简体' !important;
            }
            span{
                display: inline-block;
                width: calc(100% - 8px);
                text-align: right;
                padding-right: 12px;
            }
        }
        // .serviceFee-icon-text-td{
        //     width: 120px;
        // }
        .serviceFee-icon-text{
            display: flex;
            align-items: center;
            padding: 0 5px;
            .serviceFee-icon{
                color: #5ca3e5;
            }
            span{
                text-align: center;
                flex: 1;
            }
        }
        .qmImgge {
            width: 80px;
            height: 25px;
        }
    }
    .reimbursement-transportation-table{
        th{
            text-align: center;
            font-size: 12px !important;
            padding: 3px 5px;
            font-family: '宋体' !important;
            color: #000;
        }
        td{
            text-align: center;
            padding: 3px 5px;
            height: 40px;
            font-size: 12px !important;
            font-family: '宋体' !important;
            color: #000;
        }
        .special-table-lable-td{
            // background-color: #e6f7ff;
        }
    }
    .reimbursement-transportation-table-min {
        td{
            height: 25px !important;
            height: 25px !important;
            text-align: center;
            padding: 3px 1px;
            font-size: 12px !important;
            zoom: 0.9;
            font-family: '宋体' !important;
            color: #000;
            overflow-wrap: break-word !important;
        }
    }
    .jcybx-printTable {
        border: 1px dashed;
        width: 100%;
        display: flex;
        .jcybx-printTable-leftTable {
            display: flex;
            flex-direction: column;
            .jcybx-printTable-leftTable-title {
                font-size: 22px;
                text-align: center;
                margin-top: 0.5em;
                margin-bottom: 0.5em;
                font-family: '宋体' !important;
                font-weight: bold;
            }
        }
        .jcybx-printTable-rightPz {
            min-width: 29px;
            writing-mode: vertical-rl;
            display: flex;
            justify-content: space-evenly;
            padding: 100px 4px 100px;
            font-family: '宋体' !important;
        }
    }
    .reimbursement-transportation-table-bz {
        display: flex;
        // font-size: 10px;
        font-size: 12px;
        zoom: 0.9;
        margin-top: 12px;
        background-color: #ccffff;
        p {
            margin-bottom: 0px !important;
            font-size: 12px;
            zoom: 0.9;
        }
    }

}
@media print{
    counter-reset: page;
    .reimbursement-summary-1{
        width: 100%;
        padding: 10px 15px;
        .table-hear{
            display: flex;
            font-weight: 600;
            flex-direction: column;
            h3{
                font-weight: 600 !important;
                font-size: 18px !important;
                text-align: center;
            }
            span{
                display: inline-block;
                width: calc(100% - 8px);
                text-align: right;
                padding-right: 12px;
            }
        }
        // .serviceFee-icon-text-td{
        //     width: 120px;
        // }
        .serviceFee-icon-text{
            display: flex;
            align-items: center;
            padding: 0 5px;
            .serviceFee-icon{
                color: #5ca3e5;
            }
            span{
                text-align: center;
                flex: 1;
            }
        }
        .qmImgge {
            width: 75px !important;
            height: 25px !important;
        }
    }
    .reimbursement-transportation-table{
        th{
            text-align: center;
            font-size: 12px !important;
            padding: 3px 5px;
            font-family: '宋体' !important;
            color: #000;
        }
        td{
            text-align: center;
            padding: 3px 5px;
            height: 40px;
            font-size: 12px !important;
            font-family: '宋体' !important;
            color: #000;
            overflow-wrap: break-word !important;
        }
        .special-table-lable-td{
            // background-color: #e6f7ff;
        }
    }
    .reimbursement-transportation-table-min {
        td{
            height: 25px !important;
            height: 25px !important;
            text-align: center;
            padding: 3px 1px;
            font-size: 12px !important;
            zoom: 0.9;
            font-family: '宋体' !important;
            color: #000;
            overflow-wrap: break-word !important;
        }
    }
    .jcybx-printTable {
        border: 1px dashed;
        width: 100%;
        display: flex;
        .jcybx-printTable-leftTable {
            display: flex;
            flex-direction: column;
            .jcybx-printTable-leftTable-title {
                font-size: 22px;
                text-align: center;
                margin-top: 0.5em;
                margin-bottom: 0.5em;
                font-family: '宋体' !important;
                font-weight: bold;
            }
        }
        .jcybx-printTable-rightPz {
            min-width: 29px;
            writing-mode: vertical-rl;
            display: flex;
            justify-content: space-evenly;
            padding: 100px 4px 100px;
            font-family: '宋体' !important;
        }
    }
    .reimbursement-transportation-table-bz {
        display: flex;
        font-size: 12px;
        zoom: 0.9;
        margin-top: 12px;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
        background-color: #ccffff !important;
        font-family: '宋体' !important;
        p {
            margin-bottom: 0px !important;
            font-size: 12px;
            zoom: 0.9;
        }
    }

}

</style>
